Carbon


NavEventProcPtr

Header: Navigation.h Carbon status: Supported

Handles events such as window updating and resizing.

typedef void(* NavEventProcPtr) (
    NavEventCallbackMessage callBackSelector, 
    NavCBRecPtr callBackParms, 
    void *callBackUD
);

You would declare your function like this if you were to name it MyNavEventCallback:

void MyNavEventCallback (
    NavEventCallbackMessage callBackSelector, 
    NavCBRecPtr callBackParms, 
    void *callBackUD
);
Parameter descriptions
callBackSelector

One of the values specified by the NavEventCallbackMessage data type. These values indicate which type of event your function must respond to. For a description of the constants that represent these values, see “Event Message Constants”.

callBackParms

A pointer to a structure of type NavCBRec. Your application uses the data supplied in this structure to begin processing the event.

callBackUD

A pointer to a value set by your application when it calls a Navigation Services function such as NavGetFile. When Navigation Services calls your event-handling function, the callBackUD value is passed back to your application in this parameter.

DISCUSSION

Register your event-handling function by passing a Universal Procedure Pointer (UPP) in the eventProc parameter of a Navigation Services function such as NavGetFile. You obtain this UPP by calling the macro NewNavEventProc and passing a pointer to your event-handling function. If you determine that an event is appropriate for your event-handling function, you can call other functions to handle custom control drawing, object filtering, or custom previews. For more information, see “Creating Application-Defined Functions”.

When events involve controls, your event-handling function must respond to events only for your application-defined controls. To determine which control is affected by an event, pass the kNavCtlGetFirstControlID constant, described in “Custom Control Setting Constants”, in the selector parameter of the function NavCustomControl.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)